<?php // no direct access
defined( '_JEXEC' ) or die( 'Restricted access' ); ?>
<?php //echo modSsdiapoHelper::getHello('Hi Song Selephum Diapo'); ?>
<?php //echo "ByBomberman"; ?>


<?php 
	global $document;
	$document->addScript('media/mod_ssdiapo/diapo/scripts/jquery.easing.1.3.js');
	$document->addScript('media/mod_ssdiapo/diapo/scripts/jquery.hoverIntent.minified.js');
	$document->addScript('media/mod_ssdiapo/diapo/scripts/diapo.js');
	$document->addStyleSheet('media/mod_ssdiapo/diapo/diapo.css');
?>

<div class="pix_diapo">
<?php
	if ($handle = opendir('images/homeslider')) {
		$allowFileExt = array('jpg','png');
	    while (false !== ($entry = readdir($handle))) {
	        if(!in_array(strtolower(trim(pathinfo($entry, PATHINFO_EXTENSION))), $allowFileExt)) continue;
	        echo '<div data-thumb=""><img src="images/homeslider/'.$entry.'"></div>';
	    }
	
	    closedir($handle);
	}

?>
</div>


<script type="text/javascript">
jQuery(function(){
	//alert('xx');
	var oldIE = false;;
	if (jQuery('html').is('.ie6, .ie7')) {
        oldIE = true;
    }
    
    if(oldIE){
    	jQuery('.fromLeft').removeClass('fromLeft').addClass('fromTop');
    }

	jQuery('.pix_diapo').diapo({fx: 'scrollLeft',
		time: 5000, 
		pieDiameter: 30, 
		pieStroke: 8, 
		pagination: false, 
		commands: false});
	
});
</script>